export const PIE_STATUS = {
  '-1': '不监控',
  '0': '正常',
  '1': '有误差的表量程偏大',
  '2': '有误差的表量程偏小',
  '3': '无误差的表量程偏大',
  '4': '无误差的表量程偏小'
}

export default {
  tooltip: {
    formatter: function() {
      return PIE_STATUS[this.key] + '<br />数量:' + this.y + '(' + this.percentage.toFixed(2) + '%)'
    }
  },
  legend: {
    enabled: true,
    align: 'right',
    floating: true,
    layout: 'vertical',
    verticalAlign: 'top',
    x: -10,
    itemStyle: {
      color: '#ffffff'
    },
    squareSymbol: false,
    labelFormatter: function() {
      return this.name
    }
  },
  chart: {
    type: 'pie',
    backgroundColor: '#1c213e',
    options3d: {
      enabled: true,
      alpha: 45,
      beta: 0
    },
    spacingTop: 0,
    spacingRight: 0,
    spacingBottom: 0,
    spacingLeft: 0
  },
  plotOptions: {
    pie: {
      allowPointSelect: true,
      cursor: 'pointer',
      depth: 20,
      dataLabels: {
        enabled: false
      },
      showInLegend: true
    }
  },
  series: [
    {
      size: '80%',
      center: ['45%', '45%'],
      type: 'pie',
      animation: false,
      name: '',
      visible: false,
      data: []
    }
  ]
}
